package com.zs.toolbox.web2j.system.core.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @author shuai.zhang  on 2018/9/22
 * @description
 */
@ApiModel("注册接口")
@Data
public class WtRegisterByUsernameAndPasswordReqeust {
    @ApiModelProperty(value = "注册用户名，不添写默认生成", required = false, example = "admin")
    @Pattern(regexp = "[a-zA-z_0-9]{6,30}", message = "注册用户名应为6位数字或字母下划线组成")
    String username;

    @ApiModelProperty(value = "用户名昵称,不添写默认生成", required = false, example = "zs")
    @Size(min = 2, max = 30,message = "昵称长度为2-30个字符")
    String nickname;

    @ApiModelProperty(value = "注册密码", required = true, example = "123456")
    @Pattern(regexp = "[a-zA-z_0-9]{6,30}", message = "用户密码应为6位数字或字母下划线组成")
    String password;

    @ApiModelProperty(value = "注册验证码", required = false, example = "123456")
    @Size(min = 4, max = 10,message = "验证码长度不正确")
    String vcode;

    @ApiModelProperty(value = "注册邮箱（邮箱手机号二选一）", required = false, example = "zs@example.com")
    String email;

    @ApiModelProperty(value = "注册手机号（邮箱手机号二选一)", required = false, example = "15652750943")
    String phone;


}
